


//
//  WeatherHomeViewController.m
//  wuliangye
//
//  Created by jarze on 16/3/9.
//  Copyright © 2016年 jarze. All rights reserved.
//

#import "WeatherHomeViewController.h"
#import "ChangeColorLabel.h"
#import "UIView+SetRect.h"
@interface WeatherHomeViewController ()
@property (nonatomic, strong) ChangeColorLabel  *changeColorLabel;
@end

@implementation WeatherHomeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor = [UIColor whiteColor];
    
    // 颜色设置
    self.changeColorLabel              = [[ChangeColorLabel alloc] initWithFrame:CGRectMake(35 - 10, 100, 0, 0)];
    self.changeColorLabel.textColor    = [UIColor blackColor];
    self.changeColorLabel.changedColor = [UIColor yellowColor];
    self.changeColorLabel.font         = [UIFont systemFontOfSize:24];
    [self.changeColorLabel updateLabelView];
    [self.changeColorLabel colorPercent:0.f];
    self.changeColorLabel.alpha        = 0.f;
    [self.view addSubview:self.changeColorLabel];
    [self performSelector:@selector(show) withObject:nil afterDelay:6];
    

    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/
-(void)show
{
    // 更新标题
    self.changeColorLabel.text = @"sdsfdfsdf";
    [self.changeColorLabel updateLabelView];
    [self.changeColorLabel colorPercent:0.f];
    
    [UIView animateWithDuration:5 animations:^{
        
        // 城市名字信息
        self.changeColorLabel.x     = 35;
        self.changeColorLabel.alpha = 1.f;
    } completion:^(BOOL finished) {
        
    }];
    

}

    

@end
